home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / libx11inc.lha / X11 / Xm / MwmUtil.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-13  |  3.6 KB  |  165 lines

  1. /* 
  2.  * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
  3.  * ALL RIGHTS RESERVED
  4. */ 
  5. /*   $RCSfile: MwmUtil.h,v $ $Revision: 1.19 $ $Date: 92/05/14 12:54:07 $ */
  6. /*
  7. *  (c) Copyright 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  8. #ifndef _XmMwmUtil_h
  9. #define _XmMwmUtil_h
  10.  
  11. #include <X11/Xmd.h>    /* for protocol typedefs */
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. /*
  18.  * Contents of the _MWM_HINTS property.
  19.  */
  20.  
  21. typedef struct
  22. {
  23.     long    flags;
  24.     long    functions;
  25.     long    decorations;
  26.     int        input_mode;
  27.     long    status;
  28. } MotifWmHints;
  29.  
  30. typedef MotifWmHints    MwmHints;
  31.  
  32. /* bit definitions for MwmHints.flags */
  33. #define MWM_HINTS_FUNCTIONS    (1L << 0)
  34. #define MWM_HINTS_DECORATIONS    (1L << 1)
  35. #define MWM_HINTS_INPUT_MODE    (1L << 2)
  36. #define MWM_HINTS_STATUS    (1L << 3)
  37.  
  38. /* bit definitions for MwmHints.functions */
  39. #define MWM_FUNC_ALL        (1L << 0)
  40. #define MWM_FUNC_RESIZE        (1L << 1)
  41. #define MWM_FUNC_MOVE        (1L << 2)
  42. #define MWM_FUNC_MINIMIZE    (1L << 3)
  43. #define MWM_FUNC_MAXIMIZE    (1L << 4)
  44. #define MWM_FUNC_CLOSE        (1L << 5)
  45.  
  46. /* bit definitions for MwmHints.decorations */
  47. #define MWM_DECOR_ALL        (1L << 0)
  48. #define MWM_DECOR_BORDER    (1L << 1)
  49. #define MWM_DECOR_RESIZEH    (1L << 2)
  50. #define MWM_DECOR_TITLE        (1L << 3)
  51. #define MWM_DECOR_MENU        (1L << 4)
  52. #define MWM_DECOR_MINIMIZE    (1L << 5)
  53. #define MWM_DECOR_MAXIMIZE    (1L << 6)
  54.  
  55. /* values for MwmHints.input_mode */
  56. #define MWM_INPUT_MODELESS            0
  57. #define MWM_INPUT_PRIMARY_APPLICATION_MODAL    1
  58. #define MWM_INPUT_SYSTEM_MODAL            2
  59. #define MWM_INPUT_FULL_APPLICATION_MODAL    3
  60.  
  61. /* bit definitions for MwmHints.status */
  62. #define MWM_TEAROFF_WINDOW    (1L << 0)
  63.  
  64. /*
  65.  * The following is for compatibility only. It use is deprecated.
  66.  */
  67. #define MWM_INPUT_APPLICATION_MODAL    MWM_INPUT_PRIMARY_APPLICATION_MODAL
  68.  
  69.  
  70. /*
  71.  * Contents of the _MWM_INFO property.
  72.  */
  73.  
  74. typedef struct
  75. {
  76.     long    flags;
  77.     Window    wm_window;
  78. } MotifWmInfo;
  79.  
  80. typedef MotifWmInfo    MwmInfo;
  81.  
  82. /* bit definitions for MotifWmInfo .flags */
  83. #define MWM_INFO_STARTUP_STANDARD    (1L << 0)
  84. #define MWM_INFO_STARTUP_CUSTOM        (1L << 1)
  85.  
  86.  
  87.  
  88. /*
  89.  * Definitions for the _MWM_HINTS property.
  90.  */
  91.  
  92. typedef struct
  93. {
  94.     CARD32    flags;
  95.     CARD32    functions;
  96.     CARD32    decorations;
  97.     INT32    inputMode;
  98.     CARD32    status;
  99. } PropMotifWmHints;
  100.  
  101. typedef PropMotifWmHints    PropMwmHints;
  102.  
  103.  
  104. /* number of elements of size 32 in _MWM_HINTS */
  105. #define PROP_MOTIF_WM_HINTS_ELEMENTS    5
  106. #define PROP_MWM_HINTS_ELEMENTS        PROP_MOTIF_WM_HINTS_ELEMENTS
  107.  
  108. /* atom name for _MWM_HINTS property */
  109. #define _XA_MOTIF_WM_HINTS    "_MOTIF_WM_HINTS"
  110. #define _XA_MWM_HINTS        _XA_MOTIF_WM_HINTS
  111.  
  112. /*
  113.  * Definitions for the _MWM_MESSAGES property.
  114.  */
  115.  
  116. #define _XA_MOTIF_WM_MESSAGES    "_MOTIF_WM_MESSAGES"
  117. #define _XA_MWM_MESSAGES    _XA_MOTIF_WM_MESSAGES
  118.  
  119. /* atom that enables client frame offset messages */
  120. #define _XA_MOTIF_WM_OFFSET    "_MOTIF_WM_OFFSET"
  121.  
  122. /*
  123.  * Definitions for the _MWM_MENU property.
  124.  */
  125.  
  126. /* atom name for _MWM_MENU property */
  127. #define _XA_MOTIF_WM_MENU    "_MOTIF_WM_MENU"
  128. #define _XA_MWM_MENU        _XA_MOTIF_WM_MENU
  129.  
  130.  
  131. /*
  132.  * Definitions for the _MWM_INFO property.
  133.  */
  134.  
  135. typedef struct
  136. {
  137.     CARD32 flags;
  138.     CARD32 wmWindow;
  139. } PropMotifWmInfo;
  140.  
  141. typedef PropMotifWmInfo    PropMwmInfo;
  142.  
  143.  
  144. /* number of elements of size 32 in _MWM_INFO */
  145. #define PROP_MOTIF_WM_INFO_ELEMENTS    2
  146. #define PROP_MWM_INFO_ELEMENTS        PROP_MOTIF_WM_INFO_ELEMENTS
  147.  
  148. /* atom name for _MWM_INFO property */
  149. #define _XA_MOTIF_WM_INFO    "_MOTIF_WM_INFO"
  150. #define _XA_MWM_INFO        _XA_MOTIF_WM_INFO
  151.  
  152.  
  153. /*
  154.  * Miscellaneous atom definitions
  155.  */
  156.  
  157. /* atom for motif input bindings */
  158. #define _XA_MOTIF_BINDINGS    "_MOTIF_BINDINGS"
  159.  
  160. #ifdef __cplusplus
  161. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  162. #endif
  163.  
  164. #endif /* _XmMwmUtil_h */
  165.